<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>index</title>
</head>
<body>
<div>hash的值</div>
<div id="result"></div>
<ol>
	<li><a href="index.html#1" onclick="changeIfame(1)">index.html#1</a></li>
	<li><a href="index.html#2" onclick="changeIfame(2)">index.html#2</a></li>
	<li><a href="index.html#3" onclick="changeIfame(3)">index.html#3</a></li>
	<li><a href="index.html#4" onclick="changeIfame(4)">index.html#4</a></li>
	<li><a href="index.html#5" onclick="changeIfame(5)">index.html#6</a></li>
</ol>
<iframe id="_iframe"></iframe>
<script>
var $ = function(id){return document.getElementById(id);}
var changeIfame = function(id){
	$("_iframe").src="proxy.html?"+id;
};
(function(){
	if ('onhashchange' in window && (document.documentMode === void(0) || document.documentMode > 7 ) ) {
		changeIfame = function(){};
		window.onhashchange = function(){
			$("result").innerHTML = window.location;
		}
	} else {
		window.setInterval(function(){
			$("result").innerHTML = $("_iframe").src;
		},50);
	}
})();
</script>
</body>
</html>